Skip to content

Refactor middleware#325

Merged
florimondmanca merged 3 commits into
masterfrom
refactor/middleware-package
Sep 7, 2019
Merged

Refactor middleware#325
florimondmanca merged 3 commits into
masterfrom
refactor/middleware-package

Conversation

@florimondmanca

@florimondmanca florimondmanca commented Sep 7, 2019

Copy link
Copy Markdown
Contributor

Prompted by #305 (comment)

Moves the existing middleware in middleware.py into their own module in a middleware package.

Next up, a basic auth refactor including:

  • Add and use to_bytes()
  • Extract a reusable build_basic_auth_header() helper.

@sethmlarson

Copy link
Copy Markdown
Contributor

Could we do those extras in this PR too under the cover of "refactor middlewares"?

@florimondmanca

florimondmanca commented Sep 7, 2019

Copy link
Copy Markdown
Contributor Author

Could we do those extras in this PR too under the cover of "refactor middlewares"?

Uh, I guess I'm OK with that. I have another idea for refactoring the RedirectMiddleware to use contextvars, but that will definitely be in another PR. 😉 I'll push the extras.

@florimondmanca florimondmanca changed the title Split middleware into a subpackage Refactor middleware Sep 7, 2019
@florimondmanca florimondmanca force-pushed the refactor/middleware-package branch from 64e2b1f to 910af27 Compare September 7, 2019 21:13
@sethmlarson

Copy link
Copy Markdown
Contributor

Totally agree. You might have some minor conflicts over the PR I just merged.

@florimondmanca

Copy link
Copy Markdown
Contributor Author

Already force-pushed a rebase. 👍

Comment thread httpx/utils.py Outdated

@sethmlarson sethmlarson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you fix the one comment below you're good to merge this. 👍

@florimondmanca florimondmanca merged commit 71648ec into master Sep 7, 2019
@florimondmanca florimondmanca deleted the refactor/middleware-package branch September 7, 2019 21:22
Kludex referenced this pull request in pydantic/httpx2 May 11, 2026
Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.3.2 to 21.4.3.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](PyCQA/flake8-bugbear@21.3.2...21.4.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants